package com.lmind.bean;

public class WalkerContext implements IWalkerContext {
	
	private Object object;
	
	private String name;
	
	private Object value;
	
	private Object key;
	
	private int index;
	
	private boolean valueChanged = false;
	
	private boolean stop = false;
	
	private boolean terminate = false;

	public WalkerContext(Object object, String name, Object value, Object key,
			int index) {
		super();
		this.object = object;
		this.name = name;
		this.value = value;
		this.key = key;
		this.index = index;
	}

	public boolean isValueChanged() {
		return valueChanged;
	}

	public boolean isStop() {
		return stop;
	}

	public boolean isTerminate() {
		return terminate;
	}

	@Override
	public Object getObject() {
		return object;
	}

	@Override
	public String getName() {
		return name;
	}
	
	@Override
	public Object getKey() {
		return key;
	}

	@Override
	public int getIndex() {
		return index;
	}

	@Override
	public Object getValue() {
		return value;
	}

	@Override
	public void setValue(Object value) {
		valueChanged = true;
		this.value = value;
	}

	@Override
	public void stop() {
		stop = true;
	}

	@Override
	public void terminate() {
		terminate = true;
	}



}
